org.eclipse.vtp.framework.engine.http
Class Deployment

java.lang.Object
  extended by org.eclipse.vtp.framework.engine.http.Deployment
All Implemented Interfaces:
IResourceManagerRegistry, IProcessDescriptor

public class Deployment
extends java.lang.Object
implements IProcessDescriptor, IResourceManagerRegistry

A process deployed on the HTTP connector.

Author:
Lonnie Pryor

Constructor Summary
Deployment(IProcessEngine engine, IProcessDefinition definition, java.util.Dictionary properties, org.osgi.framework.Bundle contributor, IReporter reporter)
          Creates a new HttpDeployment.
 
Method Summary
 IDocument abort(javax.servlet.http.HttpSession httpSession, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpReesponse, java.lang.String prefix, java.util.Map variableValues, java.util.Map parameterValues)
          Aborts the supplied session.
 void dispose()
          dispose.
 java.lang.String getID()
          ReTurns the deployment ID.
 java.lang.String getPath()
          ReTurns the deployment path.
 java.lang.String getProcessID()
          Returns the ID of the process being described.
 java.lang.Object getProperty(java.lang.String propertyName)
          Returns the value of the property with the specified name or null if no such property exists.
 IResourceManager getResourceManager(java.lang.String resourceManagerID)
           
 java.lang.String[] getResourceManagerIDs()
           
 java.lang.Object getService(java.lang.String identifier)
          Returns the service selected for the specified identifier or null if no such service exists.
 java.lang.String[] getServiceIdentifiers()
          Returns the identifiers of all the externally-provided services.
 boolean isSeverityEnabled(int severity)
          Returns true if the specified report severity level is enabled.
 java.lang.Class loadClass(java.lang.String className)
          Loads a class visible to the process.
 IDocument next(javax.servlet.http.HttpSession httpSession, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpReesponse, java.lang.String prefix, java.util.Map variableValues, java.util.Map parameterValues)
          Preforms the next step in the supplied session.
 void report(int severity, java.lang.String[] categories, java.lang.String message, java.util.Dictionary properties)
          Notifies this descriptor of a report made during the execution of the process.
 void setResourceManager(java.lang.String resourceManagerID, IResourceManager resourceManager)
          Configures an available resource manager.
 IDocument start(javax.servlet.http.HttpSession httpSession, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpReesponse, java.lang.String prefix, java.util.Map variableValues, java.util.Map parameterValues, java.lang.String brand)
          Preforms the first step in the supplied session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Deployment

public Deployment(IProcessEngine engine,
                  IProcessDefinition definition,
                  java.util.Dictionary properties,
                  org.osgi.framework.Bundle contributor,
                  IReporter reporter)
Creates a new HttpDeployment.

Parameters:
engine - The process engine to use.
definition - The process definition to build from.
properties - The process properties.
contributor - The process contributor.
Method Detail

getID

public java.lang.String getID()
ReTurns the deployment ID.

Returns:
The deployment ID.

getPath

public java.lang.String getPath()
ReTurns the deployment path.

Returns:
The deployment path.

setResourceManager

public void setResourceManager(java.lang.String resourceManagerID,
                               IResourceManager resourceManager)
Configures an available resource manager.

Parameters:
resourceManagerID - The ID of the resource manager.
resourceManager - The manager to register.

start

public IDocument start(javax.servlet.http.HttpSession httpSession,
                       javax.servlet.http.HttpServletRequest httpRequest,
                       javax.servlet.http.HttpServletResponse httpReesponse,
                       java.lang.String prefix,
                       java.util.Map variableValues,
                       java.util.Map parameterValues,
                       java.lang.String brand)
Preforms the first step in the supplied session.

Parameters:
httpSession - The HTTP session.
httpRequest - The HTTP request.
httpResponse - The HTTP response.
Returns:
The next document to render.

next

public IDocument next(javax.servlet.http.HttpSession httpSession,
                      javax.servlet.http.HttpServletRequest httpRequest,
                      javax.servlet.http.HttpServletResponse httpReesponse,
                      java.lang.String prefix,
                      java.util.Map variableValues,
                      java.util.Map parameterValues)
Preforms the next step in the supplied session.

Parameters:
httpSession - The HTTP session.
httpRequest - The HTTP request.
httpResponse - The HTTP response.
Returns:
The next document to render.

abort

public IDocument abort(javax.servlet.http.HttpSession httpSession,
                       javax.servlet.http.HttpServletRequest httpRequest,
                       javax.servlet.http.HttpServletResponse httpReesponse,
                       java.lang.String prefix,
                       java.util.Map variableValues,
                       java.util.Map parameterValues)
Aborts the supplied session.

Parameters:
httpSession - The HTTP session.
httpRequest - The HTTP request.
httpResponse - The HTTP response.
Returns:
The last document to render.

dispose

public void dispose()
dispose.


getProcessID

public java.lang.String getProcessID()
Description copied from interface: IProcessDescriptor
Returns the ID of the process being described.

Specified by:
getProcessID in interface IProcessDescriptor
Returns:
The ID of the process being described.

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
                             throws java.lang.NullPointerException
Description copied from interface: IProcessDescriptor
Returns the value of the property with the specified name or null if no such property exists.

Specified by:
getProperty in interface IProcessDescriptor
Parameters:
propertyName - The name of the property to return.
Returns:
The value of the property with the specified name or null if no such property exists.
Throws:
java.lang.NullPointerException - If the specified property name is null.

getServiceIdentifiers

public java.lang.String[] getServiceIdentifiers()
Description copied from interface: IProcessDescriptor
Returns the identifiers of all the externally-provided services.

Specified by:
getServiceIdentifiers in interface IProcessDescriptor
Returns:
The identifiers of all the externally-provided services.

getService

public java.lang.Object getService(java.lang.String identifier)
                            throws java.lang.NullPointerException
Description copied from interface: IProcessDescriptor
Returns the service selected for the specified identifier or null if no such service exists.

Specified by:
getService in interface IProcessDescriptor
Parameters:
identifier - The identifier of the service to return.
Returns:
The service selected for the specified identifier or null if no such service exists.
Throws:
java.lang.NullPointerException - If the supplied identifier is null.

loadClass

public java.lang.Class loadClass(java.lang.String className)
                          throws java.lang.ClassNotFoundException,
                                 java.lang.NullPointerException
Description copied from interface: IProcessDescriptor
Loads a class visible to the process.

Specified by:
loadClass in interface IProcessDescriptor
Parameters:
className - The name of the class to load.
Returns:
The requested class instance.
Throws:
java.lang.ClassNotFoundException - If a class with the specified name cannot be found.
java.lang.NullPointerException - If the supplied class name is null.

isSeverityEnabled

public boolean isSeverityEnabled(int severity)
Description copied from interface: IProcessDescriptor
Returns true if the specified report severity level is enabled.

Specified by:
isSeverityEnabled in interface IProcessDescriptor
Parameters:
severity - The severity to check.
Returns:
True if the specified report severity level is enabled.

report

public void report(int severity,
                   java.lang.String[] categories,
                   java.lang.String message,
                   java.util.Dictionary properties)
Description copied from interface: IProcessDescriptor
Notifies this descriptor of a report made during the execution of the process.

Specified by:
report in interface IProcessDescriptor
Parameters:
severity - The severity of the report.
categories - The categories the report pertains to or null if no catagories are related.
message - The message associated with the report or null to not include a message.
properties - The properties of the report or null if no properties are specified.

getResourceManagerIDs

public java.lang.String[] getResourceManagerIDs()
Specified by:
getResourceManagerIDs in interface IResourceManagerRegistry

getResourceManager

public IResourceManager getResourceManager(java.lang.String resourceManagerID)
Specified by:
getResourceManager in interface IResourceManagerRegistry